﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="main.xhtml">
	<ui:define name="title">
		<h:outputText value="#{Lang.prop[MySession.l]['operationsetting']}" />
	</ui:define>
	<ui:define name="body">
		<a4j:region selfRendered="true" rendered="#{MySession.hasOp['100603']==true}">
			<h:outputText value="#{Role.init}" style="display:none;"/>
			<a4j:form>
				<h:outputText value="#{Lang.prop[MySession.l]['role']} : #{Role.prop['roleName']}" />
				<rich:dataTable id="dataTable" immediate="true" value="#{OpRoleRelation.recordsList}" var="item" rowKeyVar="rowNum">
					<f:facet name="header">
						<rich:columnGroup>
							<rich:column style="background: #60c8f2 url('images/left.jpg') left top no-repeat;">
								<a4j:commandLink reRender="subMsg" action="#{OpRoleRelation.updateRecords}">
									<h:outputText value="#{Lang.prop[MySession.l]['save']}" class="btn" />
									<f:param name="relationId" value="#{param['id']}" />
								</a4j:commandLink>
							</rich:column>
							<rich:column>
								<input type="checkbox" onclick="javascript:if(this.checked) selectAll(); else selectNone();" />
							</rich:column>
							<rich:column>
								<h:outputText value="#{Lang.prop[MySession.l]['opname']}" />
							</rich:column>
							<rich:column style="background: #60c8f2 url('images/right.jpg') right top no-repeat;">
								<h:outputText value="#{Lang.prop[MySession.l]['opdesc']}" />
							</rich:column>
						</rich:columnGroup>
					</f:facet>
					<rich:column style="text-align:center;width:40px;">
						<h:outputText value="#{rowNum + 1}" />
					</rich:column>
					<rich:column style="width:18px;text-align:center;white-space:nowrap;">
						<h:selectBooleanCheckbox value="#{OpRoleRelation.checkIdsMap[item.opId]}">
						</h:selectBooleanCheckbox>
					</rich:column>
					<rich:column style="text-align:center;width:80px;">
						<h:outputText value="#{item.opName}" />
					</rich:column>
					<rich:column style="text-align:left;width:200px;">
						<h:outputText value="#{item.opDesc}" />
					</rich:column>
				</rich:dataTable>
			</a4j:form>
			<ui:include src="submsg.xhtml"/>
		</a4j:region>
	</ui:define>
</ui:composition>
</html>